import { getCurrentInstance } from 'vue'
import { useI18n } from 'vue-i18n'

// 简化 vue3 调用全局挂载
export default function useGlobalProperties() {
  const { t } = useI18n()
  const { appContext: { app: { config: { globalProperties } } } } = getCurrentInstance()

  return { $t: t, ...globalProperties }
}
